package com.liurong.netty.v1.server;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class EchoServerHandler extends SimpleChannelInboundHandler<String> {

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
		System.out.println("服务器端接收的消息：" + msg);
		Channel channel = ctx.channel();
		channel.writeAndFlush("你的消息我已经收到了！是：" + msg + "吧！");
	}

}